<!-- 原子力量updated：更新为BT3的导航栏样式 -->
<nav class="navbar navbar-inverse navbar-fixed-top">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header"  style="border-right:1px solid white">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="{:U('index/index')}">OneThink</a>
      <a class="navbar-brand" href="http://www.cleanbing.cn" target="_blank_" style="padding-top:5px"><img src="__IMG__/atompower-slogan.png"/></a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">
            <think:nav name="nav">
                <eq name="nav.pid" value="0">
                <li>
                    <a href="{$nav.url|get_nav_url}" target="<eq name='nav.target' value='1'>_blank<else/>_self</eq>">{$nav.title}</a>
                </li>
                </eq>
            </think:nav>
        </ul>

        <form class="navbar-form navbar-left" role="search">
            <div class="form-group">
                <input type="text" class="form-control" placeholder="Search">
            </div>
            <button type="submit" class="btn btn-default">Go</button>
        </form>

        <ul class="nav navbar-nav navbar-right">
            <if condition="is_login()">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{:get_username()}<span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="{:U('User/profile')}">修改密码</a></li>
                        <li><a href="{:U('User/logout')}">退出</a></li>
                    </ul>
                </li>               
            <else/>
                <li><a href="{:U('User/login')}">登录</a></li>                        
                <li><a href="{:U('User/register')}">注册</a></li>
            </if>
        </ul>


    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
